<?php
$req = Zend_Controller_Front::getInstance()->getRequest();
$_ignore_modules = array('messages');    
if (in_array($req->getModuleName(), $_ignore_modules)) return;
?>
<?php  
  $this->headScript()
    ->appendFile($this->baseUrl() . '/application/modules/Poll/externals/scripts/composer.js');
?>
<script type="text/javascript">
  en4.core.runonce.add(function() {
    var type = 'wall';
    if (composeInstance.options.type) type = composeInstance.options.type;
    composeInstance.addPlugin(new Composer.Plugin.Poll({
      title : '<?php echo $this->string()->escapeJavascript($this->translate('Ask Question')) ?>',
      lang : {
        'Ask Question' : '<?php echo $this->string()->escapeJavascript($this->translate('Ask Question')) ?>',
        'Ask something...' : '<?php echo $this->string()->escapeJavascript($this->translate('Ask something...')) ?>',
        'Add an option...' : '<?php echo $this->string()->escapeJavascript($this->translate('Add an option...')) ?>',
        'Allow anyone to add options' : '<?php echo $this->string()->escapeJavascript($this->translate('Allow anyone to add options')) ?>',
        'Add Poll' : '<?php echo $this->string()->escapeJavascript($this->translate('Add Poll')) ?>',
        'Share' : '<?php echo $this->string()->escapeJavascript($this->translate('Share')) ?>',
        'Public' : '<?php echo $this->string()->escapeJavascript($this->translate('Public')) ?>',
        'Friends' : '<?php echo $this->string()->escapeJavascript($this->translate('Friends')) ?>'
      }
    }));
  });
</script>